<html>
<head>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<link rel="stylesheet" type="text/css" href="map.css">
<script type="text/javascript">
var map;
var proj4326 = new OpenLayers.Projection("EPSG:4326");
var proj900913 = new OpenLayers.Projection("EPSG:900913");
var extent = new OpenLayers.Bounds(-23.47,62.82,-14.3,67.00).transform(proj4326
,proj900913);
function init(){
    var mapOptions = {
    projection: new OpenLayers.Projection('EPSG:900913'),
    units: 'm',
    //resolutions: [78271.516964,39135.758482,19567.879241,9783.9396205,4891.96981025,2445.98490513,1222.99245256,611.496226281,305.748113141,152.87405657,76.4370282852,38.2185141426,19.1092570713,9.55462853565,4.77731426782,2.38865713391,1.19432856696,0.597164283478,0.298582141739],
    resolutions: [78271.516964,39135.758482,19567.879241,9783.9396205,4891.96981025,2445.98490513,1222.99245256,611.496226281,305.748113141,152.87405657,76.4370282852,38.2185141426,19.1092570713,9.55462853565,4.77731426782,2.38865713391,1.19432856696,0.597164283478,0.298582141739],
    restrictedExtent: extent 
    };

    map = new OpenLayers.Map('map', mapOptions);

    var layer = new OpenLayers.Layer.TMS('TMS osm', 'http://jonl-t.co.uk/osm/tms/',
        {layername: 'osm_EPSG900913', type: 'png',
         tileSize: new OpenLayers.Size(256, 256),zoomOffset:0
    });
    map.addLayer(layer)
    map.zoomToExtent(extent);
    var markers = new OpenLayers.Layer.Markers("Markers");
    map.addLayer(markers);
    var maxZoomLevel = 5;
    map.events.register("moveend", this, function (e) {
        if (map.getZoom() < maxZoomLevel)
        {
            map.zoomTo(maxZoomLevel);
        }
    });
    
    var size = new OpenLayers.Size(32,37);
    var offset = new OpenLayers.Pixel(-(size.w/2),-size.h);
    var icon1 = new OpenLayers.Icon('icons/hotel.png',size,offset);
    icon1.setOpacity(0.7);
    
    var icon2 = new OpenLayers.Icon('icons/hotel.png',size,offset);
    icon2.setOpacity(0.7);
    
    var lonlaterik = new OpenLayers.LonLat(-21.9268,64.14081);
    lonlaterik.transform(proj4326,proj900913);
    markererik = new OpenLayers.Marker(lonlaterik,icon1);
    
    
    var lonlatbbkef = new OpenLayers.LonLat(-22.5772,63.97468);
    lonlatbbkef.transform(proj4326,proj900913);
    markerbbkef = new OpenLayers.Marker(lonlatbbkef,icon2);
    
    markers.addMarker(markererik);
    
    markers.addMarker(markerbbkef);
    
}
</script>
</head>
<body onload="init()">
<div id='map'/>
</body>
</html>
